
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page session="false" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>房间体系_保存活动页面</title>
<link type="text/css" rel="stylesheet" href="/css/style.css" />
</head>
<body>	
	<div class="fjStar">
   	  <h2><span>房间活动</span><a href="/room!index.jspa?roomid=${roomid}">返回主页>></a></h2>
      <div class="bd gl">
      	<ul>
        	<li><b>活动标题:</b>
		        	<input id="active_subject" type="text" class="btInp" 
		        	<c:if test="${activeid!=0}">value="${activeInfo[0].active_subject }"</c:if>
		        	<c:if test="${activeid==0}">style="color:#848484;" value="活动标题最多输入15个汉字"</c:if>
		    			onfocus="if(value=='活动标题最多输入15个汉字'){this.style.color='#000000'; value=''}" 
		    			onblur="if(value==''){this.style.color='#848484'; value='活动标题最多输入15个汉字'}"
						onkeyup="checkMax(this,30);" onafterpaste="checkMax(this,30);"/>
			</li>
		
			    <li><b>开始时间:</b>
			      <input id="startime_str" type="text" style="color:#848484;" value="开始日期" class="sjInp1"
			    onfocus="if(value=='开始日期'){this.style.color='#000000'; value=''}" 
			    onblur="if(value==''){this.style.color='#848484'; value='开始日期'}" 
			    class="datetxt01"/>
        	    <a href="javascript:void(0);"><img src="images/tmBg.gif" onclick="$('#startime_str').click();return false;"/></a>
    	        <input id="startime_hour" type="text" value="00"  style="color:#848484;text-align:right;" class="sjInp2" 
      onfocus="if(value=='00'){this.style.color='#000000'; value=''}" 
      onblur="if(value==''){this.style.color='#848484'; value='00'}" 
      onkeyup="this.value=this.value.replace(/\D/g,'');computDate();" 
      onafterpaste="this.value=this.value.replace(/\D/g,'')" />时
	             <input id="startime_min" type="text" value="00"  style="color:#848484;text-align:right;" class="sjInp2"
       onfocus="if(value=='00'){this.style.color='#000000'; value=''}" 
       onblur="if(value==''){this.style.color='#848484'; value='00'}" 
       onkeyup="this.value=this.value.replace(/\D/g,'');computDate();" 
       onafterpaste="this.value=this.value.replace(/\D/g,'')" />分
            </li>
            <li><b>活动时长:</b>
				<select class="datesel" id="active_time" onchange="computDate();">
     				<option value="0">活动时长</option>
     				<option value="30">30分钟</option>
     				<option value="60">1小时</option>
                    <option value="90">1.5小时</option>
                    <option value="120">2小时</option>
                    <option value="180">3小时</option>
                    <option value="240">4小时</option>
                    <option value="300">5小时</option>
                    <option value="360">6小时</option>
                </select>
			</li>
			<li class="timeCont jsTime" style="display:none;"><b>结束时间:</b><span id="endtime"></span>&nbsp;</li>
            <li><b>活动简介:</b>
            <textarea class="introCont" id="active_content"  <c:if test="${activeid==0}">style="color:#848484;"</c:if>
       			onfocus="if(value=='字数限制为0~200个汉字'){this.style.color='#000000'; value=''}" 
       			onblur="if(value==''){this.style.color='#848484'; value='字数限制为0~200个汉字'}" 
       			onkeyup="checkMax(this,400);" onafterpaste="checkMax(this,400);"><c:if test="${activeid!=0}">${activeInfo[0].active_content }</c:if><c:if test="${activeid==0}">字数限制为0~200个汉字</c:if></textarea>
       		<i>字数限制为0~200个汉字</i></li>
           
           
           
             <li>
            <span style="float:left;<c:if test="${activeInfo[0].fileid!=-1&&activeInfo[0].fileid!=0&&activeid!=0 }">display:none;</c:if>" id="uploadfiletxt"  ><b>上传附件:</b></span>
            <a href="javascript:void(0);"  class="fl flashObject" style="float:left;display:block;padding:2px 0 0 8px;width:45px;height:20px;cursor:pointer;text-decoration: none; <c:if test="${activeInfo[0].fileid!=-1&&activeInfo[0].fileid!=0&&activeid!=0 }">display:none;</c:if>">
            <b id="uploadfile" class="tjhb"></b></a>
            <span class="scz" style="display:none;" id="uploadFileprocess"><font style="float:left">上传中...</font>
			<b class="progss"><span class="proWidth"></span><span class="proTip">50%</span></b><a href=""><img src="images/dIcon.gif" /></a>
			</span>
            <span id="uf" <c:if test="${activeInfo[0].fileid==-1||activeid==0 }">style="display:none;"</c:if>>
            <input type="hidden" id="uf_pho_path"/>
            <span class="hbml fl">&nbsp;</span>
            <span class="ce10 hbml fl"><b>已完成:</b></span>
            <a id="uf_pho_name" class="hbml fl"><c:if test="${activeInfo[0].fileid!=-1&&activeInfo[0].fileid!=0&&activeid!=0 }">${activeInfo[0].filename}</c:if></a>
            <a href="<c:if test="${activeInfo[0].fileid!=-1&&activeInfo[0].fileid!=0&&activeid!=0 }">javascript:delImg('http://room.img.17guagua.com${activeInfo[0].fileURL }');delActivePho(-1);</c:if><c:if test="${activeInfo[0].fileid==-1||activeid==0 }">#</c:if>" class="close" id="uf_del_h" title="删除"><img src="images/sc.gif" /></a>
   	 		</span><i style="margin-left:30px;">提示：附件为活动详情，供运营审核。支持TXT,DOC格式，大小1M以内。</i>
            </li>            
             <li><b id="uploadactivetxt" >添加海报:</b>
            <a href="#" class="fl flashObject"  style="float:left;display:block;padding:2px 0 0 8px;width:45px;height:20px;cursor:pointer;text-decoration: none;" title="提示：支持JPG,PNG;大小500K以内;尺寸介于451*221和1024*1024之间">
            <b id="uploadactive" class="tjhb"></b></a>
            <span class="scz" style="display:none;" id="uploadImgprocess"><font style="float:left">上传中...</font><b class="progss"><span class="proWidth"></span><span class="proTip1">100%</span></b><a href=""><img src="images/dIcon.gif" /></a></span>
            <span id="ywc" class="ywc" style="display:none;">已完成:<em id="ywc_pho_name"></em>
            <a href="#" class="close" id="ywc_del_h" title="删除"><img src="images/sc.gif" /></a>
   	 		</span><i style="margin-left:30px;">提示：支持JPG，PNG；大小在500K以内。</i>
            </li>          
            <li class="bigPic"><b>预览大图:</b>
            	<!-- 
                <div>
                	<h4>尺寸小贴士：</h4>
                    <p>上传一张精彩生动的活动海报，让你<br />的活动受到更高的关注度 </p>
                    <i><font color="#000000">提示：</font>支持JPG，PNG；大小在1M以内。</i>
                </div>
                 -->
                  
       			<c:if test="${activeid==0}"><img id="active_avatar" src="/images/Head.jpg" alt="" /></c:if>
		        <c:if test="${activeid!=0}">
                  	<c:if test="${activeInfo[0].imgURL eq '' }">
                  		<img src="/images/active_small.jpg" id="active_avatar" alt=""/>
					</c:if>
					<c:if test="${activeInfo[0].imgURL ne '' }">
                  		<img src="${activeInfo[0].imgURL }" id="active_avatar" alt=""/>
					</c:if>
				</c:if>
				
            </li>                    
            <li><b>活动分类:</b>
            	<!--  size="5" -->
            	<select id="tag_category" class="sel" onchange="activeTag(this.value);" onclick="activeTag(this.value);" disabled><option value="0">请选择分类</option></select>
       			<select id="tag_id" class="sel" disabled><option value="0">请选择</option></select>
            </li>
            <li class="last">
            <input id="center_flag" type="checkbox" class="fl" onclick="centerChange();" style="vertical-align:middle;" <c:if test="${online_week<20 }">disabled</c:if>/>
            <label class="fl" title="需达到周平均在线20人">发布到活动中心</label>
            <a href="http://u.room.17guagua.net/userinfo/protocol.html" target="_blank">
            	&lt;&lt;管理条例&gt;&gt;
            </a>
            </li>
            <li class="last1">
           		<a  class="qdbtn" id="activeSub"  href="javascript:subActive();" >确定</a>
            	<a  class="qxbtn" href="#" onclick = "activeReIndex();return false;">取消</a>
            </li>
        </ul>
       </div> 
  </div> 
	<c:if test="${activeid!=0}">
	  <input type="hidden" id="ac_photo_name_${activeInfo[0].id}" value="${activeInfo[0].photo_name}">
	  <input type="hidden" id="ac_start_time_${activeInfo[0].id}" value="${activeInfo[0].start_time}">
	  <input type="hidden" id="ac_end_time_${activeInfo[0].id}" value="${activeInfo[0].end_time}">
	  <input type="hidden" id="ac_start_time_long_${activeInfo[0].id}" value="${activeInfo[0].start_time_long}">
	  <input type="hidden" id="ac_end_time_long_${activeInfo[0].id}" value="${activeInfo[0].end_time_long}">
	  <input type="hidden" id="ac_photoid_${activeInfo[0].id}" value="${activeInfo[0].photoid}">
	  <input type="hidden" id="ac_centerflag_${activeInfo[0].id}" value="${activeInfo[0].center_flag}">
	  
	  <input type="hidden" id="uf_fileURL" value="${activeInfo[0].fileURL }">
	  <input type="hidden" id="uf_fileid" value="${activeInfo[0].fileid}">
	  <input type="hidden" id="uf_filename" value="${activeInfo[0].filename}">
	</c:if>
	<input type="hidden" id="room_id" value="${room_id}"/>
	<input type="hidden" id="activeid" value="${activeid}"/>
  <div id="cropActiveImg" class="bombC" style="display:none;z-index:99;position:absolute;left:500px;top:20px;">
    <div class="bombBBox1">
  	<h4>请裁剪图片为标准尺寸<a class="close" href="javascript:jcrop_api.destroy();$('#cropActiveImg').hide();delImg($('#targetActive').attr('src'));"></a></h4>
    <div class="bd">
    	<div class="leftI">
    		<div class="tImg">
    			<img  src="" id="targetActive" />
    		</div>
    		 <p class="tTxt">标准尺寸：216*101</p>
    	</div>
   		<input type="hidden" name="x1"  id="x1" />
		<input type="hidden" name="y1"  id="y1" />
		<input type="hidden" name="x2"  id="x2" />
		<input type="hidden" name="y2"  id="y2" />    	
    	<div class="rightT">
           	<div class="td1">
               	<p>预览:</p>
                   <div class="tImg" id="hideDivForPre">
                   	<img src=""  id="preview" />
                   </div>
               </div>
               <div class="td1">
               	<p>&nbsp;</p>
                   <div class="tPs">216*101</div>
               </div>
               <div class="td2">
               	你上传的图片会自动生成标准尺寸大小，请注意标准尺寸的海报是否清晰！
               </div>
           <div class="td3">
           	<a class="but1" id="subCrop" href="#">确定</a><a class="but1" href="javascript:jcrop_api.destroy();$('#cropActiveImg').hide();delImg($('#targetActive').attr('src'));">取消</a>
           </div>
       	</div>
    	</div> 
    </div>  
  	</div>
  </div>
</body>
</html>
<style>
<!--
.flashObject{ blr:expression(this.onFocus=this.blur()) } /* for IE */
object:focus { outline: none; } /* for Firefox */ 
-->
</style>


<link rel="stylesheet" type="text/css" href="/css/jscal2.css" />
<link rel="stylesheet" type="text/css" href="/css/jquery.Jcrop.css" />
<script type="text/javascript" src="/js/jquery-1.7.1.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/jquery.Jcrop.min.js" charset="utf-8"></script>
<c:if test="${activeid==0}">
<script type="text/javascript" src="/js/jscal2.js" charset="utf-8"></script> 
<script type="text/javascript" src="/js/cn.js" charset="utf-8"></script>
</c:if>
<script type="text/javascript" src="/js/jcrop_1_0.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/room/util.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/room/activeCrop.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/room/activeUtil.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/swfobject.js" charset="utf-8"></script>

			      